
$(function () {
    var myImg=(function () {
        var imgNode=document.createElement('img');
        document.body.appendChild(imgNode);
        return function (src) {
            imgNode.src=src;
        }
    })();
    var proxyImg=(function () {
        var img=new Image;
        img.onload=function () {
            myImg(this.src);
        };
        return function (src) {
            myImg('../img/temp.jpg');
            img.src=src;
        };
    })();
    proxyImg('https://static.xiaohuochai.site/icon/icon_200.png');
});

var beforehandLoad=(function(){
    var myImg=(function () {
        var imgNode=document.createElement('img');
        return function (src) {
            imgNode.src=src;
            return imgNode;
        }
    })();
    var beforehandLoadFun=function () {

    };
    beforehandLoadFun.prototype.init=function(){

    };
    beforehandLoadFun.prototype.render=(function(){
        var img=new Img;
        img.onload=function () {
            myImg(this.src);
        }
        return function (src) {
            myImg('../img/temp.jpg');
            img.src=src;
        };
    })();
    return beforehandLoadFun;
})();
